//用于判断用户是否有按钮权限，没有直接删除按钮节点
import pinia from "@/stores";
import useRouteStore from "@/stores/modules/routes";
//@ts-ignore
let routeStore = useRouteStore(pinia);
export const installPermi = (app) => {
  app.directive("btnPermission", {
    mounted(el, options) {
      if (!routeStore.btnPermiList.includes(options.value)) {
        el.parentNode.removeChild(el);
      }
    },
  });
};
